package cn.stylefeng.guns.modular.launchpad.controller;

import cn.stylefeng.guns.modular.base.util.Result;
import cn.stylefeng.guns.modular.launchpad.entity.Pledge;
import cn.stylefeng.guns.modular.launchpad.service.PledgeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/pledge")
public class PledgeController {

    @Autowired
    private PledgeService pledgeService;
    private String PREFIX = "/modular/launchpad/pledge/";

    // 查询质押流水列表
    @GetMapping("/list")
    @ResponseBody
    public Result getList(Pledge pledge) {
        return Result.success(pledgeService.getList(pledge));
    }

    /**
     * 跳转到质押首页
     */
    @RequestMapping("")
    public String index() {
        return PREFIX + "pledge.html";
    }



}
